package com.patterns.chainOfResponsibility.wifelySubmission;

/**
 * Created by Xiao Yiyun on 2017/4/28.
 * 妇女类的实现类
 */
public class Women implements IWomen {

    //通过int型变量来描述妇女的个人情况
    //1——未出嫁
    //2——出嫁
    //3——丈夫去世了
    private int type = 0;
    //妇女的请示
    private String request = " ";
    //构造函数传递请求
    public Women(int type, String request) {
        this.type = type;
        switch (this.type) {
            case 1: this.request = "女儿的请求是" + request;
                    break;
            case 2: this.request = "妻子的请求是" + request;
                    break;
            case 3: this.request = "母亲的请求是" + request;
                    break;
        }
    }
    //获取自己的状况
    public int getType() {
        return this.type;
    }
    //获得请求
    public String getRequest() {
        return this.request;
    }
}
